package cn.wolfcode.mapper;

import cn.wolfcode.domain.BusinessReport;
import cn.wolfcode.domain.Consumption;
import cn.wolfcode.domain.ConsumptionExample;
import cn.wolfcode.domain.ConsumptionKey;

import java.util.List;

import cn.wolfcode.query.BusinessReportQueryObject;
import cn.wolfcode.query.ConsumptionQueryObject;
import org.apache.ibatis.annotations.Param;


//主表Mapper
public interface ConsumptionMapper {
    int countByExample(ConsumptionExample example);

    int deleteByExample(ConsumptionExample example);

    int deleteByPrimaryKey(ConsumptionKey key);

    List<Consumption> selectByExample(ConsumptionExample example);

    int updateByExampleSelective(@Param("record") Consumption record,
                                 @Param("example") ConsumptionExample example);

    int updateByExample(@Param("record") Consumption record,
                        @Param("example") ConsumptionExample example);

    Consumption selectByPrimaryKey(ConsumptionKey key);

    //带有selective的方法是可以处理参数为空的方法，防止修改时由于空值覆盖
    int updateByPrimaryKeySelective(Consumption record);

    //这种方法可以设置属性为null值
    int updateByPrimaryKey(Consumption record);

    int insert(Consumption record);

    int insertSelective(Consumption record);

    List<Consumption> selectAll();

    List<Consumption> selectForList(ConsumptionQueryObject qo);

    Consumption selectByCno(String cno);

    List<BusinessReport> selectBusinessReportData(BusinessReportQueryObject qo);


}